package org.example.Pojo;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class GameButton {
    private JButton end;//提前结束按钮
    private JButton again;//重新开始按钮
    private JButton back;//刷新-->返回第一版
    private JButton regret;//悔棋-->结束游戏前只能用一次，如果多次则给出提示
    private JButton help;
    private JButton[] buttons;//四个按钮的数组

    public GameButton(){
        end=new JButton("提前结束");
        again=new JButton("重新开始");
        back=new JButton("刷新界面");
        regret=new JButton("悔棋");
        help=new JButton("游戏规则");

        buttons=new JButton[5];
        buttons[0]=end;
        buttons[1]=again;
        buttons[2]=back;
        buttons[3]=regret;
        buttons[4]=help;
    }

    public JButton getAgain() {
        return again;
    }

    public JButton getBack() {
        return back;
    }

    public JButton getEnd() {
        return end;
    }

    public JButton getRegret() {
        return regret;
    }

    public JButton[] getButtons() {
        return buttons;
    }

    public JButton getHelp() {
        return help;
    }
}
